<extend name="layout/index" />
<block name="content">
    <link rel="stylesheet" href="/static/admin/css/style.css" />
    <link rel="stylesheet" href="/static/admin/js/plugins/layer/skin/layui.css" />

    <div class="wrapper wrapper-content animated fadeInRight">

        <div class="row">
            <div class="col-sm-12">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>访问记录（{$list->total()}）</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"  href="">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="collapse-link">
                                <i class="fa fa-chevron-up"></i>
                            </a>
                            <a class="close-link">
                                <i class="fa fa-times"></i>
                            </a>
                        </div>
                    </div>
                    <div class="ibox-content">
                        <div class="table-responsive">
                            <table class="table table-striped">
                                <thead>
                                <tr>
                                    <th>ID</th>
                                    <th>IP地址</th>
                                    <th>所在城市</th>
                                    <th>浏览时间</th>
                                    <th>操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <volist name="list" id="vo">
                                    <tr><td>{$vo.id}</td>
                                        <td>{$vo.ip}</td>
                                        <td>{$vo.city}</td>
                                        <td>{$vo.create_time|date="Y-m-d H:i:s"}</td>
                                        <td data-field="11" data-key="1-0-11" data-off="true" class="layui-table-col-special">
                                            <div class="layui-table-cell laytable-cell-1-0-11">
                                                <a class="layui-btn layui-btn-danger layui-btn-xs" onclick="del('{$vo.id}','{:url('index/view_record_del')}')" lay-event="del">删除</a>
                                            </div>
                                        </td>
                                    </tr>
                                </volist>
                                </tbody>
                            </table>
                        </div>
                            {$list->render()|raw}
                    </div>
                </div>
            </div>

        </div>
    </div>
</block>

<block name="js">
    <script type="text/javascript">
        //Demo
        layui.use('form', function() {
            var form = layui.form;

            //监听提交
            form.on('submit(formDemo)', function(data) {
                layer.msg(JSON.stringify(data.field));
                return false;
            });
        });
    </script>
</block>